'use strict';

angular.module('SystemManage').controller('AppRoleListController', ['$scope', 'PublicModule', 'PublicEnum', '$location', 'Authentication',
    function($scope, PublicModule, PublicEnum, $location, Authentication) {
    	PublicModule.initModule($scope, 'AppRole');
        $scope.Module.AppRole.PageSize = 15;
         $scope.Module.AppRole.Condition = {IsEffective: true};

        $scope.btnAdd = function(){
        	$location.url('/index/AppRole/Edit');
        };

        $scope.rowDblClick = function(){
            $scope.$apply(function(){
                $location.url("/index/AppRole/Edit/" + $scope.Module.AppRole.FocusedRecord._id);
            });
        };

        $scope.btnDelete = function(){
        	$scope.Module.AppRole.deleteSelecteds();
        };
    }
]);
